{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/home/ucav/PythonProjects/fly-craft-examples\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "from pathlib import Path\n",
    "import sys\n",
    "\n",
    "PROJECT_ROOT_DIR = Path().absolute().parent.parent\n",
    "if str(PROJECT_ROOT_DIR.absolute()) not in sys.path:\n",
    "    sys.path.append(str(PROJECT_ROOT_DIR.absolute()))\n",
    "print(PROJECT_ROOT_DIR)\n",
    "\n",
    "from flycraft.env import FlyCraftEnv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "env = FlyCraftEnv(config_file=PROJECT_ROOT_DIR / \"env_her.json\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Dict('achieved_goal': Box([   0.  -90. -180.], [1000.   90.  180.], (3,), float32), 'desired_goal': Box([   0.  -90. -180.], [1000.   90.  180.], (3,), float32), 'observation': Box([-180.  -90. -180.    0.  -90. -180. -300.    0.], [  180.    90.   180.  1000.    90.   180.   300. 20000.], (8,), float32))"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "env.observation_space"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Box([   0.  -90. -180.], [1000.   90.  180.], (3,), float32)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "goal_space = env.observation_space[\"desired_goal\"]\n",
    "goal_space"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(3,)"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "goal_space.shape"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "dcs_py38",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.13"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "9aabd176a0f50fb7955ff2f90c45e48e18b6943f41a6242db6acd9cab2d045db"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
